Named tags are an alternative to Shopify’s metafields in the Algolia AI Search & Discovery app.
encoded
type described below.attr:value
Extracts value
as a string
.
Can’t contain a comma.
Example: author:Isaac Asimov
attr:boolean:value
Extracts value
- true or false - as a boolean
.
Example: suitable_for_children:boolean:true
attr:number:value
Extracts value
- integer or decimal - as a number
.
Example: age:number:34
Example: alternative_price:number:199.90
attr:encoded:value
Extracts and decodes a URL-encoded value
.
Allows for commas.
Example: alternative_name:encoded:Me%2C%20Myself%20and%20I
,
by %2C
, but the URL-encoded approach provides a safe way to make sure that all characters are properly interpreted by Shopify’s tag engine.encodeURIComponent
in JavaScript[option_name:option_value]variant_tag:variant_tag_option
.
For example:
long_name:Small
to a product’s size S variant, then add the following tag to the product: [size:S]long_name:Small
.original_price:number:19.90
to a product’s size S and blue variant, then add the following tag to the product: [size:S][color:blue]original_price:number:19.90
size
and color
, and only specify one of them, the named tag will be applied to all of the matching ones.*
at the end of the value to target all of the option values starting with this string.
For instance, [color:B*]
will apply to both Blue
and Brown
colors.